﻿using Prism.Commands;
using Prism.Regions;
using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zhy.PrismRegion.NewRegion.ViewModels
{
    public class MainWindowViewModel
    {
        /// <summary>
        /// 弹窗按钮
        /// </summary>
        public DelegateCommand ShowDialogCommand { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dialogService">弹窗服务接口注入</param>
        public MainWindowViewModel(IDialogService dialogService)
        {
            ShowDialogCommand = new DelegateCommand(() => // 弹窗按钮
            {
                dialogService.ShowDialog("DialogView"); // 弹出窗体
            });
        }
    }
    
}
